package cn.rc.rcsystem.feign;

import cn.rc.rcsystem.domain.LeaseOrderCar;
import cn.rc.rcsystem.fallback.CarRentalServiceFallbackFactory;
import cn.rc.rcsystem.fallback.OlderServiceFallbackFactory;
import cn.rc.rcsystem.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name="service-older",path = "/leaseOrderCar",contextId = "olderService",fallbackFactory = OlderServiceFallbackFactory.class )
public interface OlderService {
    @RequestMapping(value="/save",method= RequestMethod.POST)
    JSONResult saveOrUpdate(@RequestBody LeaseOrderCar leaseOrderCar);
    @RequestMapping(value = "/addLeaseOrderCar",method = RequestMethod.POST)
    public JSONResult addLeaseOrderCar(@RequestBody LeaseOrderCar leaseOrderCar);
}
